package cn.com.yang.server.jetty;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class DumpServlet extends HttpServlet{

	private static final long serialVersionUID = 1L;
	/**
	 *  .css对应text/css
		.txt对应text/plain
		.html对应text/html
		.jpg或jpeg对应image/jpeg
		.png对应image/png
		.js对应application/x-javascript
	 */
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		//响应图片
		resp.setContentType("text/jpeg");
		resp.setStatus(HttpServletResponse.SC_OK);
		resp.getWriter().write("byte[]");
		super.doGet(req, resp);
	}
}
